# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-injector
pkgver=0.21.0
pkgrel=2
pkgdesc="Python dependency injection framework, inspired by Guice"
url="https://github.com/alecthomas/injector"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-typing-extensions"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
options="!check" # Tests apparently aren't in pypi tarballs?
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/i/injector/injector-$pkgver.tar.gz"
builddir="$srcdir/injector-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" pytest-3
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
1e0c1342404c6b5b4a6189065d0709ff7f4e75ae209d5c2b570d9bf370d5ad0aef1f9d1914558819c997d17f4f609522e1199061518d782030594ecf4f84d280  injector-0.21.0.tar.gz
"
